package com.example.robertluozizhao.framecollectdemo.activity;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.robertluozizhao.framecollectdemo.R;
import com.example.robertluozizhao.framecollectdemo.adapter.NormalTextAdapter;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Lzz on 7/27/2019.
 * 外部拦截法
 */

public class HorizontalAndVerticalScrollActivity01 extends AppCompatActivity{

    @BindView(R.id.rv)
    RecyclerView mRv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_horizontal_scroll);
        ButterKnife.bind(this, this);
        initData();
    }

    private void initData() {
        ArrayList<String> strings = new ArrayList<>();
        for (int i = 1; i < 81; i++) {
            strings.add("第"+i+"个");
        }
        mRv.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.VERTICAL,false));
        NormalTextAdapter normalTextAdapter = new NormalTextAdapter(strings);
        mRv.setAdapter(normalTextAdapter);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
